
export interface Rule {
    id: string;
    flag: "always" | "never";
    descEn: string;
    descCn: string;
    defaultValue?: string | number | string[];
    optionList?: string[];
}


export const RuleList: Rule[] = [
    {
        id: "body-full-stop",
        flag: "never",
        descEn: "body ends with value",
        descCn: "正文以配置值结束",
        defaultValue: ".",
    },
    {
        id: "body-leading-blank",
        flag: "always",
        descEn: "body begins with blank line",
        descCn: "正文开始前需要空白行",
    },
    {
        id: "body-empty",
        flag: "never",
        descEn: "body is empty",
        descCn: "正文为空",
    },
    {
        id: "body-max-length",
        flag: "always",
        descEn: "body has value or less characters",
        descCn: "正文最大长度",
        defaultValue: 1000,
    },
    {
        id: "body-max-line-length",
        flag: "always",
        descEn: "body lines has value or less characters",
        descCn: "正文每行最大长度",
        defaultValue: 80,
    },
    {
        id: "body-min-length",
        flag: "always",
        descEn: "body has value or more characters",
        descCn: "正文最少长度",
        defaultValue: 0,
    },
    {
        id: "body-case",
        flag: "always",
        descEn: "body is in case value",
        descCn: "正文大小写格式",
        defaultValue: "lower-case",
        optionList: [
            'lower-case',
            'upper-case',
            'camel-case',
            'kebab-case',
            'pascal-case',
            'sentence-case',
            'snake-case',
            'start-case'
        ],
    },
    {
        id: "footer-leading-blank",
        flag: "always",
        descEn: "footer begins with blank line",
        descCn: "结尾开始前需要空白行",
    },
    {
        id: "footer-empty",
        flag: "never",
        descEn: "footer is empty",
        descCn: "结尾为空",
    },
    {
        id: "footer-max-length",
        flag: "always",
        descEn: "footer has value or less characters",
        descCn: "结尾最大长度",
        defaultValue: 1000,
    },
    {
        id: "footer-max-line-length",
        flag: "always",
        descEn: "footer lines has value or less characters",
        descCn: "结尾每行最大长度",
        defaultValue: 80,
    },
    {
        id: "footer-min-length",
        flag: "always",
        descEn: "footer has value or more characters",
        descCn: "结尾最小长度",
        defaultValue: 0,
    },
    {
        id: "header-case",
        flag: "always",
        descEn: "header is in case value",
        descCn: "标题大小写格式",
        defaultValue: "lower-case",
        optionList: [
            'lower-case',
            'upper-case',
            'camel-case',
            'kebab-case',
            'pascal-case',
            'sentence-case',
            'snake-case',
            'start-case'
        ],
    },
    {
        id: "header-full-stop",
        flag: "never",
        descEn: "header ends with value",
        descCn: "标题以配置值结束",
        defaultValue: ".",
    },
    {
        id: "header-max-length",
        flag: "always",
        descEn: "header has value or less characters",
        descCn: "标题最大长度",
        defaultValue: 72,
    },
    {
        id: "header-min-length",
        flag: "always",
        descEn: "header has value or more characters",
        descCn: "标题最小长度",
        defaultValue: 0,
    },
    {
        id: "references-empty",
        flag: "never",
        descEn: "references has at least one entry",
        descCn: "引用内容为空",
    },
    {
        id: "scope-enum",
        flag: "always",
        descEn: "scope is found in value",
        descCn: "影响访问列表",
        defaultValue: [],
    },
    {
        id: "scope-case",
        flag: "always",
        descEn: "scope is in case value",
        descCn: "影响范围大小写格式",
        defaultValue: "lower-case",
        optionList: [
            'lower-case',
            'upper-case',
            'camel-case',
            'kebab-case',
            'pascal-case',
            'sentence-case',
            'snake-case',
            'start-case'
        ],
    },
    {
        id: "scope-empty",
        flag: "never",
        descEn: "scope is empty",
        descCn: "影响范围为空",
    },
    {
        id: "scope-max-length",
        flag: "always",
        descEn: "scope has value or less characters",
        descCn: "影响范围最大长度",
        defaultValue: 20,
    },
    {
        id: "scope-min-length",
        flag: "always",
        descEn: "scope has value or more characters",
        descCn: "影响访问最小长度",
        defaultValue: 0,
    },
    {
        id: "subject-case",
        flag: "always",
        descEn: "subject is in one of the cases",
        descCn: "标题大小写格式",
        defaultValue: ['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
        optionList: [
            'lower-case',
            'upper-case',
            'camel-case',
            'kebab-case',
            'pascal-case',
            'sentence-case',
            'snake-case',
            'start-case',
        ],
    },
    {
        id: "subject-empty",
        flag: "never",
        descEn: "subject is empty",
        descCn: "标题为空",
    },
    {
        id: "subject-full-stop",
        flag: "never",
        descEn: "subject ends with value",
        descCn: "标题以配置值结束",
        defaultValue: "."
    },
    {
        id: "subject-max-length",
        flag: "always",
        descEn: "subject has value or less characters",
        descCn: "标题最大长度",
        defaultValue: 1000,
    },
    {
        id: "subject-min-length",
        flag: "always",
        descEn: "subject has value or more characters",
        descCn: "标题最小长度",
        defaultValue: 0,
    },
    {
        id: "subject-exclamation-mark",
        flag: "never",
        descEn: "subject has exclamation before the : marker",
        descCn: "标题前置分隔符",
    },
    {
        id: "type-empty",
        flag: "never",
        descEn: "type is empty",
        descCn: "类型为空",
    },
    {
        id: "signed-off-by",
        flag: "always",
        descEn: "message has value",
        descCn: "签名配置值",
        defaultValue: "Signed-off-by:",
    },
    {
        id: "trailer-exists",
        flag: "always",
        descEn: "message has trailer value",
        descCn: "结尾配置值",
        defaultValue: "Signed-off-by:",
    },
];